package container;

import iface.Modificator;

import java.util.List;

import definition.Dice;

/**
 * Class which contains the parameters for the probability calculation.
 * 
 * @author Joana Otetelisanu
 * @author Marcus Lindner
 */
public class ProbabilityParameters {

    private int attackModifier;
    private int damageMultiplicator;
    private int defenseModifier;
    private Dice diceType;
    private int numberOfAttackDices;
    private int numberOfDefenseDices;
    private int targetArmor;
    private List<Modificator> attackModifiers;
    private List<Modificator> defenceModifiers;
    private boolean isDefenceThreshold;
    private boolean isAttackThreshold;
    private boolean ap;
    private boolean weakFacing;

    /**
     * Returns the attack modifier.
     * 
     * @return the attack modifier
     */
    public int getAttackModificator() {
	return this.attackModifier;
    }

    /**
     * @return the damageMultiplicator
     */
    public int getDamageMultiplicator() {
	return this.damageMultiplicator;
    }

    /**
     * Returns the defense modifier.
     * 
     * @return the defense modifier
     */
    public int getDefenseModificator() {
	return this.defenseModifier;
    }

    /**
     * @return the diceType
     */
    public Dice getDiceType() {
	return this.diceType;
    }

    /**
     * @return number of sides
     */
    public int getDiceSides() {
	return getDiceType().getNumberOfSides();
    }

    /**
     * @return the numberOfAttackDices
     */
    public int getNumberOfAttackDices() {
	return this.numberOfAttackDices;
    }

    /**
     * @return the numberOfDefenseDices
     */
    public int getNumberOfDefenseDices() {
	return this.numberOfDefenseDices;
    }

    /**
     * @return the targetArmor
     */
    public int getTargetArmor() {
	return this.targetArmor;
    }

    /**
     * @param dm the damageMultiplicator to set
     */
    public void setDamageMultiplicator(int dm) {
	this.damageMultiplicator = dm;
    }

    /**
     * @param armor the targetArmor to set
     */
    public void setTargetArmor(int armor) {
	this.targetArmor = armor;
    }

    /**
     * @return the attackModifiers
     */
    public List<Modificator> getAttackModifiers() {
	return this.attackModifiers;
    }

    /**
     * @return the defenceModifiers
     */
    public List<Modificator> getDefenceModifiers() {
	return this.defenceModifiers;
    }

    /**
     * @param isThreshold the isThreshold to set
     */
    public void setDefenceThreshold(boolean isThreshold) {
	this.isDefenceThreshold = isThreshold;
    }

    /**
     * @return the isThreshold
     */
    public boolean isDefenceThreshold() {
	return this.isDefenceThreshold;
    }

    /**
     * @param attackThreshold the isAttackThreshold to set
     */
    public void setAttackThreshold(boolean attackThreshold) {
	this.isAttackThreshold = attackThreshold;
    }

    /**
     * @return the isAttackThreshold
     */
    public boolean isAttackThreshold() {
	return this.isAttackThreshold;
    }

    /**
     * @param attModifier the attackModifier to set
     */
    public void setAttackModifier(int attModifier) {
	this.attackModifier = attModifier;
    }

    /**
     * @param defModifier the defenseModifier to set
     */
    public void setDefenseModifier(int defModifier) {
	this.defenseModifier = defModifier;
    }

    /**
     * @param type the diceType to set
     */
    public void setDiceType(Dice type) {
	this.diceType = type;
    }

    /**
     * @param numberOfAttDices the numberOfAttackDices to set
     */
    public void setNumberOfAttackDices(int numberOfAttDices) {
	this.numberOfAttackDices = numberOfAttDices;
    }

    /**
     * @param numberOfDefDices the numberOfDefenseDices to set
     */
    public void setNumberOfDefenseDices(int numberOfDefDices) {
	this.numberOfDefenseDices = numberOfDefDices;
    }

    /**
     * @param attModifiers the attackModifiers to set
     */
    public void setAttackModifiers(List<Modificator> attModifiers) {
	this.attackModifiers = attModifiers;
    }

    /**
     * @param defModifiers the defenceModifiers to set
     */
    public void setDefenceModifiers(List<Modificator> defModifiers) {
	this.defenceModifiers = defModifiers;
    }

    /**
     * @param pAp {@code true} if the weapon has AP.
     */
    public void setAP(boolean pAp) {
	this.ap = pAp;
    }

    /**
     * @return {@code true} if the weapon has AP.
     */
    public boolean getAP() {
	return this.ap;
    }

    /**
     * 
     * @param pWeakFacing {@code true} if the defendant has weak facing
     */
    public void setWeakFacing(boolean pWeakFacing) {
	this.weakFacing = pWeakFacing;
    }
    
    /**
     * 
     * @return {@code true} if the defendant has weak facing
     */
    public boolean getWeakFacing() {
	return this.weakFacing;
    }
}
